package com.janwen.spring.typeconvert;

import java.math.BigDecimal;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.format.annotation.NumberFormat;
import org.springframework.format.annotation.NumberFormat.Style;

import com.sun.istack.internal.NotNull;

/**
 * refer:http://blog.springsource.com/2009/11/17/spring-3-type-conversion-and-validation/
 * @author janwen
 * Sep 5, 2012
 */
public class Account {

	@DateTimeFormat(style = "S-")
	@NotNull
	private Date activationDate = new Date(1258466400);

	@NumberFormat(style = Style.CURRENCY)
	private BigDecimal balance = new BigDecimal("3000.25");
}
